#!/bin/bash
trap 'kill -9 `jobs -p`; exit 1' SIGINT

./cgeneration.pl --start 2013:01:23:00:00:00 -end 2013:01:24:00:00:00 &
./cgeneration.pl --start 2013:01:24:00:00:00 -end 2013:01:25:00:00:00 &
./cgeneration.pl --start 2013:01:25:00:00:00 -end 2013:01:26:00:00:00 &
./cgeneration.pl --start 2013:01:26:00:00:00 -end 2013:01:27:00:00:00 &
./cgeneration.pl --start 2013:01:27:00:00:00 -end 2013:01:29:00:00:00 &

for p in `jobs -p`
do
   wait $p || echo $p failed
done

